Here I need to generate documents from DOORS using RPE, but I want to use a DXL button to set the RPE parameters and fire it without any manual action. |
Re: How to run a command line scripts via DXL
This example should get you started. This is cut from a larger script that dynamically creates a specification file before calling RPE, but you could create this manually and store it somewhere.
// RPE Launcher
/*
12-OCT-2011 Tony Goodman Server installation
*/
const string RPE_FOLDER = "<server location>"
const string RPE_HOME = RPE_FOLDER "\\Rational\\Publishing Engine\\1.1.2"
const string RPE_LAUNCHER = RPE_HOME "\\launcher\\rpe-launcher.exe"
// you must first create he specification file
const string SPECIFICATION_FILE = "generated.dsx"
bool showResults = true
void rpeLauncher()
{
Buffer cmd = create
// Set the RPE_HOME environment variable before calling launcher
// This does not interfere with any local installation of RPE as it gets
// overwritten when RPE in started locally.
setenv("RPE_HOME", RPE_HOME)
cmd += RPE_LAUNCHER
// specify the output folder
cmd += " -data "
cmd += "\"" rpeOutputFolder "\""
// publish from the supplied specification file
cmd += " -publish "
cmd += "\"" SPECIFICATION_FILE "\""
if (!showResults)
{
// inhibit display of launcher results window
cmd += " -noresult"
}
// give command string to windows for execution
// We cannot wait for the result by using win32SystemWait_() because RPE is using the current instance of DOORS
// and doing so would result in dead-lock (RPE trying to communicate with a process that is stopped,
// waiting for RPE to finish).
system(stringOf(cmd))
delete(cmd)
}
rpeLauncher()
|
Re: How to run a command line scripts via DXL https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14612904� Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |